/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package autenticacion.Capa_Presentacion;
import autenticacion.Capa_Negocios.cntLogin;
import autenticacion.Capa_Negocios.cntPerfil;
/**
 *
 * @author Miguel
 */
public class frmLogin {
    public String ide_usuario;
    public String ide_perfil;
    public String nom_usuario;
    public boolean validarUsuario_control(String user, String pass){
        cntLogin cnt = new cntLogin();
        if (cnt.validarUsuario_control(user, pass)){
            ide_usuario=cnt.ide_usuario;
            ide_perfil =cnt.ide_perfil;
            nom_usuario =cnt.nom_usuario;
            return true;
        }
        return false;
    }
    public String getMenu(){
        String html="";
        cntPerfil cnt = new cntPerfil(ide_perfil);
        
        return cnt.createMenu();
        //return html;
    }
    public String show(){
        String html="";
         html="<div  align='center'>Ingresar Datos<table  cellspacing='0'>" +
                "<tr>" +
                    "<td class='login'>Ingrese Usuario</td>"+
                    "<td><input tabindex='1' type='text' id='txtuser' class='txtlogin' size='10' value='072-03-16172' onblur='txtClicklost(this);'";
        html+=" onFocus='txtClick(this,\"usuario\")'>";
        html+=" <td rowspan ='2' class='login' colspan='2' align='center'>" +
                "<button tabindex='3' id='btnlogin' onclick='login(this)' class='btnlogin'><img src='IMAGES/checked.gif'></img><b>Ingresar</b></button> </td>"+
                "</tr>"+
		"	<tr>"+
				"<td class='login'>Ingrese Password</td>"+
				"<td><input tabindex='2' type='password' id='txtpassword' class='txtlogin' size='10' value='12345' onblur='txtClicklost(this);' onFocus='txtClick(this,\"password\")'></td>"+
		"	</tr>"+
		"</table>"+
		"<div id='eLogin' align='left' class='divError'></div>"+
	"</div>";
        return html;
    }
}
